<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link  type="text/css" href="jquery-ui-1.8.18.custom.css" rel="stylesheet"></link>
<script type="text/javascript" src="jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="jquery-ui-1.8.18.custom.min.js"></script>
</head>
<body>
	<div id="test" >
		<p>aaa</p>
	</div>
	<script type="text/javascript">
		try{
			$("#test").dialog(
					{
						autoOpen: false,
						width:600,
						title:"title",
						buttons: {
							"Ok": function() { 
								$(this).dialog("close"); 
							}, 
							"Cancel": function() { 
								$(this).dialog("close"); 
							} 
						}
					}) ;
		}catch(e){alert(e.message);}
	function show(){
		$("#test").dialog("open") ;
		return false ;
	}
	function getValue(){
		//这里传回的是个数组,如果没有选择，返回的就是NULL
		var values = $("#selectObj").val() ;
		alert(values) ;
	}
	</script>
	<button onClick="javascript:show()">测试弹出框</button>
	
	<div>
		<select id="selectObj" multiple="multiple" size="10" style="width:120px">
			<option value="1">1</option>
			<option value="11">11</option>
			<option value="12">12</option>
			<option value="13">13</option>
			<option value="14">14</option>
			<option value="15">15</option>
		</select>
		<button onClick="javascript:getValue()">测试获取值</button>
	</div>
	
</body>
</html>